<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加商品</strong></div> ${sessionScope.message}
  <div class="body-content">
  	<form method="post" class="form-x" enctype="multipart/form-data"  action="AddGoods.do">  
      <div class="form-group">
        <div class="label">
          <label>商品名称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="gname" data-validate="required:请输入商品名称" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>图片：</label>
        </div>
        <div class="field">
          <input type="file" class="button bg-blue margin-left" id="file" name="gimage" style="float:left;">
          <div class="tipss">图片尺寸：500*500</div>
        </div>
      </div>     
        <div class="form-group">
          <div class="label">
            <label>商品分类：</label>
          </div>
          <div class="field">
            <select name="cid" class="input w50">
              <option value="">请选择分类</option>
              <option value="台式电脑">台式电脑</option>
              <option value="笔记本电脑">笔记本电脑</option>
              <option value="电脑硬件">电脑硬件</option>
            </select>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>价格：</label>
          </div>
      	  <div class="field">
            <input type="text" class="input w50" name="gprice" data-validate="required:请输入商品价格,number:价格必须为数字" />
            <div class="tips"></div>
          </div>
        </div>
         <div class="form-group">
          <div class="label">
            <label>库存：</label>
          </div>
      	<div class="field">
          <input type="text" class="input w50" name="gstock" data-validate="required:请输入库存数量,number:库存数量必须为数字" />
          <div class="tips"></div>
        </div>
        </div>

      <div class="form-group">
        <div class="label">
          <label>商品内容：</label>
        </div>
        <div class="field">
          <textarea name="content" class="input" style="height:450px; border:1px solid #ddd;"></textarea>
          <div class="tips"></div>
        </div>
      </div>
      <div class="clear"></div>
      <div class="form-group">
        <div class="label">
          <label>上架时间：</label>
        </div>
        <div class="field"> 
          <input type="date" class="laydate-icon input w50" name="shelftime" data-validate="required:日期不能为空" style="padding:10px!important; height:auto!important;border:1px solid #ddd!important;" />
          <div class="tips"></div>
        </div>
      </div>
      <br></br>
      <div class="form-group">
        <div class="label">
          <label>品牌：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="brand"   />
          <div class="tips"></div>
        </div>
      </div>
      		<br></br>
        <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
   </form>
  </div>
</div>
</body></html>